
var app=angular.module("redBookAPP",["ionic","ngResource","redBookAPP.controller","redBookAPP.service"]);
app.config(function ($stateProvider,$urlRouterProvider) {
    $stateProvider
        .state("tabs",{
            url:"/tabs",
            templateUrl:"template/tabs.html",
            controller:"TabsController"
        })
        //首页部分
        .state("tabs.home",{
            url:"/home",
            views:{
                "tabs-home":{
                    templateUrl:"template/home/home.html",
                    controller:"HomeController"
                }
            }
        })
        //详情  笔记页
        .state("tabs.xiangqing",{
            url:"/xiangqing/:id",
            views:{
                "tabs-home":{
                    templateUrl:"template/home/xiangqing.html",
                    controller:"XiangqingController"
                }
            }
        })
        //相关笔记 按钮
        .state("tabs.pinglun",{
            url:"/pinglun/:id",
            views:{
                "tabs-home":{
                    templateUrl:"template/home/pinglun.html",
                    controller:"PinglunController"
                }
            }
        })
        //发现部分
        .state("tabs.find",{
            url:"/find",
            views:{
                "tabs-find":{
                    templateUrl:"template/find/find.html",
                    controller:"FindController"
                }
            }
        })
        //购买部分
        .state("tabs.purchase",{
            url:"/purchase",
            views:{
                "tabs-purchase":{
                    templateUrl:"template/purchase/purchase.html",
                    controller:"PurchaseController"
                }
            }
        })
        //购买的子部分
        .state("tabs.purchase.quanbu",{
            url:"/quanbu",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/quanbu.html",
                    controller:"QuanbuController"
                }
            }
        })
        .state("tabs.purchase.hufu",{
            url:"/hufu",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/hufu.html",
                    controller:"HufuController"
                }
            }
        })
        .state("tabs.purchase.caizhuang",{
            url:"/caizhuang",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/caizhuang.html",
                    controller:"CaizhuangController"
                }
            }
        })
        .state("tabs.purchase.shishang",{
            url:"/shishang",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/shishang.html",
                    controller:"ShishangController"
                }
            }
        })
        .state("tabs.purchase.jiaju",{
            url:"/jiaju",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/jiaju.html",
                    controller:"JiajuController"
                }
            }
        })
        .state("tabs.purchase.muying",{
            url:"/muying",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/muying.html",
                    controller:"MuyingController"
                }
            }
        })
        .state("tabs.purchase.gerenhuli",{
            url:"/gerenhuli",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/gerenhuli.html",
                    controller:"GerenhuliController"
                }
            }
        })
        .state("tabs.purchase.jiatingqingjie",{
            url:"/jiatingqingjie",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/jiatingqingjie.html",
                    controller:"JiatingqingjieController"
                }
            }
        })
        .state("tabs.purchase.meishi",{
            url:"/meishi",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/meishi.html",
                    controller:"MeishiController"
                }
            }
        })
        .state("tabs.purchase.baojianpin",{
            url:"/baojianpin",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/baojianpin.html",
                    controller:"BaojianpinController"
                }
            }
        })
        .state("tabs.purchase.shumajiadian",{
            url:"/shumajiadian",
            views:{
                "purchase-quanbu":{
                    templateUrl:"template/purchase/shumajiadian.html",
                    controller:"ShumajiadianController"
                }
            }
        })
        //消息部分
        .state("tabs.news",{
            url:"/news",
            views:{
                "tabs-news":{
                    templateUrl:"template/news/news.html",
                    controller:"NewsController"
                }
            }
        })
        .state("tabs.news.dongtai",{
            url:"/dongtai",
            views:{
                "news-view":{
                    templateUrl:"template/news/dongtai.html",
                    controller:"DongtaiController"
                }
            }
        })
        .state("tabs.news.tongzhii",{
            url:"/tongzhi",
            views:{
                "news-view":{
                    templateUrl:"template/news/tongzhi.html",
                    controller:"TongzhiController"
                }
            }
        })
        .state("tabs.news.guanyuni",{
            url:"/guanyuni",
            views:{
                "news-view":{
                    templateUrl:"template/news/guanyuni.html",
                    controller:"GuanyuniController"
                }
            }
        })
        //我的部分
        .state("tabs.mine",{
            url:"/mine",
            views:{
                "tabs-mine":{
                    templateUrl:"template/mine/mine.html",
                    controller:"MineController"
                }
            }
        });
    $urlRouterProvider.otherwise("/tabs/home");
        
        
})